home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / software / radiance / ez3d / win95nt / data.z / rotateSphericalDragger.iv < prev    next >
Text File  |  1995-12-04  |  5KB  |  216 lines

  1. #Inventor V2.0 ascii
  2.  
  3. #from:    File { name "pieces/yCircle.iv" }
  4. DEF ROTATE_SPHERICAL_DRAGGER_Y_CIRCLE Group {
  5.     NormalBinding { value PER_VERTEX }
  6.     Coordinate3 {
  7.     point [
  8.  
  9.         # first quadrant
  10.         1.0  0  0.0,
  11.  
  12.         0.980785  0  0.195090,
  13.         0.923880  0  0.382683,
  14.         0.831470  0  0.555570,
  15.         0.707107  0  0.707107,
  16.         0.555570  0  0.831470,
  17.         0.382683  0  0.923880,
  18.         0.195090  0  0.980785,
  19.  
  20.         # second quadrant
  21.         0.0  0  1.0,
  22.  
  23.         -0.195090  0  0.980785,
  24.         -0.382683  0  0.923880,
  25.         -0.555570  0  0.831470,
  26.         -0.707107  0  0.707107,
  27.         -0.831470  0  0.555570,
  28.         -0.923880  0  0.382683,
  29.         -0.980785  0  0.195090,
  30.  
  31.         # third quadrant
  32.         -1.0  0  0.0,
  33.  
  34.         -0.980785  0  -0.195090,
  35.         -0.923880  0  -0.382683,
  36.         -0.831470  0  -0.555570,
  37.         -0.707107  0  -0.707107,
  38.         -0.555570  0  -0.831470,
  39.         -0.382683  0  -0.923880,
  40.         -0.195090  0  -0.980785,
  41.  
  42.         # fourth quadrant
  43.         0.0  0  -1.0,
  44.  
  45.         0.195090  0  -0.980785,
  46.         0.382683  0  -0.923880,
  47.         0.555570  0  -0.831470,
  48.         0.707107  0  -0.707107,
  49.         0.831470  0  -0.555570,
  50.         0.923880  0  -0.382683,
  51.         0.980785  0  -0.195090,
  52.  
  53.         1.0  0  0.0,
  54.  
  55.     ]
  56.     }
  57.     Normal {
  58.     vector [ 
  59.  
  60.         # first quadrant
  61.         1.0  0  0.0,
  62.  
  63.         0.980785  0  0.195090,
  64.         0.923880  0  0.382683,
  65.         0.831470  0  0.555570,
  66.         0.707107  0  0.707107,
  67.         0.555570  0  0.831470,
  68.         0.382683  0  0.923880,
  69.         0.195090  0  0.980785,
  70.  
  71.         # second quadrant
  72.         0.0  0  1.0,
  73.  
  74.         -0.195090  0  0.980785,
  75.         -0.382683  0  0.923880,
  76.         -0.555570  0  0.831470,
  77.         -0.707107  0  0.707107,
  78.         -0.831470  0  0.555570,
  79.         -0.923880  0  0.382683,
  80.         -0.980785  0  0.195090,
  81.  
  82.         # third quadrant
  83.         -1.0  0  0.0,
  84.  
  85.         -0.980785  0  -0.195090,
  86.         -0.923880  0  -0.382683,
  87.         -0.831470  0  -0.555570,
  88.         -0.707107  0  -0.707107,
  89.         -0.555570  0  -0.831470,
  90.         -0.382683  0  -0.923880,
  91.         -0.195090  0  -0.980785,
  92.  
  93.         # fourth quadrant
  94.         0.0  0  -1.0,
  95.  
  96.         0.195090  0  -0.980785,
  97.         0.382683  0  -0.923880,
  98.         0.555570  0  -0.831470,
  99.         0.707107  0  -0.707107,
  100.         0.831470  0  -0.555570,
  101.         0.923880  0  -0.382683,
  102.         0.980785  0  -0.195090,
  103.  
  104.         1.0  0  0.0,
  105.     ]
  106.     }
  107.  
  108.     LineSet {}
  109. }
  110.  
  111. DEF ROTATE_SPHERICAL_DRAGGER_ROTATOR Group {
  112.  
  113.     # This is what the user will actually see.
  114.  
  115.     # scale up so that a unit circle and sphere will surround
  116.     # the bounding box.
  117.     Scale { scaleFactor 1.732 1.732 1.732 }
  118.  
  119.     # circle around x axis
  120.     Separator {
  121.     RotationXYZ { axis Z angle 1.57079 }
  122.     USE ROTATE_SPHERICAL_DRAGGER_Y_CIRCLE
  123.     }
  124.     # circle around y axis
  125.     USE ROTATE_SPHERICAL_DRAGGER_Y_CIRCLE
  126.  
  127.     # circle around z axis
  128.     Separator {
  129.     RotationXYZ { axis X angle 1.57079 }
  130.     USE ROTATE_SPHERICAL_DRAGGER_Y_CIRCLE
  131.     }
  132.  
  133.     # Draw a full sphere so there's something meaty
  134.     # for the mouse to pick
  135.     DrawStyle { style INVISIBLE }
  136.     Separator {
  137.         Complexity { value .3 }
  138.     Sphere {}
  139.     }
  140. }
  141.  
  142. DEF rotateSphericalRotator Separator {
  143.     renderCaching ON
  144.     Material {
  145.     diffuseColor    [ 0. 0.5 0. ]
  146.     emissiveColor    [ 0. 0.5 0. ]
  147.     }
  148.     DrawStyle { style LINES lineWidth 2 }
  149.     LightModel { model PHONG }
  150.     Texture2 {}
  151.  
  152.  
  153.     USE ROTATE_SPHERICAL_DRAGGER_ROTATOR
  154. }
  155.  
  156. DEF rotateSphericalRotatorActive Separator {
  157.     renderCaching ON
  158.     Material {
  159.     diffuseColor    [ 0.5 0.5 0.0 ]
  160.     emissiveColor    [ 0.5 0.5 0.0 ]
  161.     }
  162.     DrawStyle { style LINES lineWidth 3 }
  163.     LightModel { model PHONG }
  164.     Texture2 {}
  165.  
  166.  
  167.     USE ROTATE_SPHERICAL_DRAGGER_ROTATOR
  168. }
  169.  
  170.  
  171. DEF ROTATE_SPHERICAL_DRAGGER_FEEDBACK Group {
  172.     # A skinny set of axes.
  173.  
  174.     #x-axis
  175.     NormalBinding { value DEFAULT }
  176.     Coordinate3 { point [ -1.25 0 0, 1.25 0 0 ] }
  177.     LineSet {}
  178.  
  179.     #y-axis
  180.     Coordinate3 { point [ 0 -1.25 0, 0 1.25 0 ] }
  181.     LineSet {}
  182.  
  183.     #z-axis
  184.     Coordinate3 { point [ 0 0 -1.25, 0 0 1.25 ] }
  185.     LineSet {}
  186. }
  187.  
  188. DEF rotateSphericalFeedback Separator {
  189.     renderCaching ON
  190.     PickStyle { style UNPICKABLE }
  191.     Material {
  192.     diffuseColor    [ 0.25 0.05 0.36 ]
  193.     emissiveColor    [ 0.25 0.05 0.36 ]
  194.     }
  195.     DrawStyle { lineWidth 2 }
  196.     LightModel { model PHONG }
  197.     Texture2 {}
  198.  
  199.     USE ROTATE_SPHERICAL_DRAGGER_FEEDBACK
  200. }
  201. DEF rotateSphericalFeedbackActive Separator {
  202.     renderCaching ON
  203.     PickStyle { style UNPICKABLE }
  204.     Material {
  205.     diffuseColor    [ 0.36 0.05 0.44 ]
  206.     emissiveColor    [ 0.36 0.05 0.44 ]
  207.     }
  208.     DrawStyle { lineWidth 2 }
  209.     LightModel { model PHONG }
  210.     Texture2 {}
  211.  
  212.     USE ROTATE_SPHERICAL_DRAGGER_FEEDBACK
  213. }
  214.  
  215.  
  216.